﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GZ.Entity;
public partial class dessert : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        InitCateProList();
    }
    public void InitCateProList()
    {
        EProductInfo productAccessor = new EProductInfo();
        IList<EProductInfo> products = productAccessor.GetProductsByCategory(2);
        System.Text.StringBuilder htmls = new System.Text.StringBuilder();
        if (products != null)
        {
            foreach (EProductInfo product in products)
            {
                htmls.AppendFormat("<a href=\"detail.aspx?id={0}\" onfocus=\"this.blur();\"><img src=\"{1}\" width=\"190\" height=\"180\" /></a>", product.Id, product.ImgUrl1);
            }
            lblPros.Text = htmls.ToString();
        }
    }
}